<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   pengchy的回复  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/profile/6119/replies/page/10/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466467031: Accept with keywords: (title(0.0):论坛, topn(0.2):角度,RSS订阅,画图,下载站,帖子,会员,聚类分析,文件,用户名,世武,主站,边距,中图,部分,收藏夹,函数,检验,问题,密码,普通,随机,方法,主题,程序,总计,p值,正态分布,种子,论坛,讨论区).-->
 </head>
 <body class="bbp-user-page single singular bbpress paged-10 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    pengchy的回复
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-0 type- status-publish hentry" id="post-0">
        <header class="entry-header">
         <h1 class="entry-title">
          pengchy
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div id="bbp-user-wrapper">
           <div id="bbp-single-user-details">
            <div id="bbp-user-avatar">
             <span class="vcard">
              <a class="url fn n" href="http://cos.name/cn/profile/6119/" rel="me" title="pengchy">
               <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=150&amp;d=monsterid&amp;r=g"/>
              </a>
             </span>
            </div>
            <!-- #author-avatar -->
            <div id="bbp-user-navigation">
             <ul>
              <li class="">
               <span class="vcard bbp-user-profile-link">
                <a class="url fn n" href="http://cos.name/cn/profile/6119/" rel="me" title="pengchy的档案">
                 档案
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-topics-created-link">
                <a href="http://cos.name/cn/profile/6119/topics/" title="pengchy发起的主题">
                 发起的主题
                </a>
               </span>
              </li>
              <li class="current">
               <span class="bbp-user-replies-created-link">
                <a href="http://cos.name/cn/profile/6119/replies/" title="pengchy创建的回复">
                 创建的回复
                </a>
               </span>
              </li>
              <li class="">
               <span class="bbp-user-favorites-link">
                <a href="http://cos.name/cn/profile/6119/favorites/" title="pengchy的收藏夹">
                 收藏夹
                </a>
               </span>
              </li>
             </ul>
            </div>
            <!-- #bbp-user-navigation -->
           </div>
           <!-- #bbp-single-user-details -->
           <div id="bbp-user-body">
            <div class="bbp-user-replies-created" id="bbp-user-replies-created">
             <h2 class="entry-title">
              回复的主题
             </h2>
             <div class="bbp-user-section">
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 136 到 150（总计 266 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/6119/replies/page/9/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/9/">
                 9
                </a>
                <span class="page-numbers current">
                 10
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/11/">
                 11
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/18/">
                 18
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/6119/replies/page/11/">
                 →
                </a>
               </div>
              </div>
              <ul class="forums bbp-replies" id="topic-0-replies">
               <li class="bbp-header">
                <div class="bbp-reply-author">
                 作者
                </div>
                <!-- .bbp-reply-author -->
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-header -->
               <li class="bbp-body">
                <div class="bbp-reply-header" id="post-272332">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年6月9日 上午10:35
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15541/">
                    求助：如何设置随机种子？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15541/#post-272332">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-272332 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15541 bbp-reply-position-4 user-id-6119 post-272332 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   set.seed是为了保证你在不同的时间地点做的同一个随机所得到的结果是一样的。使用如下：
                  </p>
                  <pre class="highlight ">&gt; sample(10)
 [1]  6  3  4  5  1  2  7 10  8  9
&gt; set.seed(1)
&gt; sample(10)
 [1]  3  4  5  7  2  8  9  6 10  1
&gt; sample(10)
 [1]  3  2  6 10  5  7  8  4  1  9
&gt; set.seed(10)
&gt; sample(10)
 [1]  6  3  4  5  1  2  7 10  8  9
&gt; set.seed(1)
&gt; sample(10)
 [1]  3  4  5  7  2  8  9  6 10  1
&gt;
</pre>
                  <p>
                   当种子一样时，后面紧跟着的随机数产生的是一样的。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-271156">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月22日 上午11:16
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15348/">
                    求助：各位高手帮我看一下我这段R程序为什么出错？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15348/#post-271156">
                   6 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-271156 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15348 bbp-reply-position-6 user-id-6119 post-271156 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   i=i+1
                   <br/>
                   这个不应该要，因为for(i in 1:n){}中的i已经增加了。
                   <br/>
                   for(i in 1:10){
                   <br/>
                   print(i)
                   <br/>
                   }
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-271058">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月21日 上午7:30
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15339/">
                    让R运行时就自动加载指定文件夹下的R程序。
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15339/#post-271058">
                   7 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-271058 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15339 bbp-reply-position-7 user-id-6119 post-271058 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   咦！原来还可以这样！ [s:13]  [s:13]
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270998">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月20日 下午12:05
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15325/">
                    R的程序文件一般都如何组织?
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15325/#post-270998">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270998 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15325 bbp-reply-position-5 user-id-6119 post-270998 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   我是以函数名保存一个函数为一个文件，用哪个就source那个文件
                   <br/>
                   把所有的函数都放在一个文件里，函数太多就不好编辑了，看着也不舒服。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270412">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月12日 上午10:14
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15241/">
                    求助 如何通过命令行将生成的图片文件保存？
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15241/#post-270412">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270412 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15241 bbp-reply-position-2 user-id-6119 post-270412 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   ?savePlot
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270393">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月12日 上午4:24
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15236/">
                    请问如何用R实现随机抽取数并分组问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15236/#post-270393">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270393 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15236 bbp-reply-position-4 user-id-6119 post-270393 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   a &lt;- sample(1:12,6)
                   <br/>
                   b &lt;- setdiff(1:12,a)
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270390">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月12日 上午4:23
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15223/">
                    关于聚类分析中图的问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15223/#post-270390">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270390 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15223 bbp-reply-position-5 user-id-6119 post-270390 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   或者直接画到pdf文件里，把画布设的大一些，比如：pdf(width=15, height=20,file="test.pdf")
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270386">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月12日 上午4:18
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15236/">
                    请问如何用R实现随机抽取数并分组问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15236/#post-270386">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270386 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15236 bbp-reply-position-2 user-id-6119 post-270386 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   sample(1:12,6)
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270385">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月12日 上午4:15
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15230/">
                    统计学的一个问题
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15230/#post-270385">
                   3 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270385 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15230 bbp-reply-position-3 user-id-6119 post-270385 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   你随机的目的是什么呢？为了检验你测得的值是否显著的高或者低？
                   <br/>
                   检验是否正态分布可以用qqplot();qqline();以及ks.test(),如果是正态分布，就可以按照正态分布的特征来获得p值了。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270259">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月9日 下午5:37
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/13819/">
                    [求助]R Warning，出现"只适用于UTF-8语言环境"
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/13819/#post-270259">
                   4 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270259 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-13819 bbp-reply-position-4 user-id-6119 post-270259 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <pre class="highlight ">&gt; a &lt;- paste(letters[1:10],1:10,sep="")
&gt; a
 [1] "a1"  "b2"  "c3"  "d4"  "e5"  "f6"  "g7"  "h8"  "i9"  "j10"
&gt; grep("\\d",a)
[1] 4
&gt;b &lt;-  grep("\\d",a,perl=TRUE)
Warning message:
In grep("\\d", a, perl = TRUE) :
  perl = TRUE is only fully implemented in UTF-8 locales
&gt; b
 [1]  1  2  3  4  5  6  7  8  9 10
</pre>
                  <p>
                   是的，可以不理会。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-270089">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年5月7日 下午5:44
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/14985/">
                    统计之都下载站的访问方法
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/14985/#post-270089">
                   14 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-270089 -->
                <div class="odd bbp-parent-forum-986 bbp-parent-topic-14985 bbp-reply-position-14 user-id-6119 post-270089 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-269471">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年4月30日 下午2:17
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15086/">
                    让R的代数运算飞起来——ATLAS简介与测评
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15086/#post-269471">
                   10 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-269471 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15086 bbp-reply-position-10 user-id-6119 post-269471 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   SPRINT: A new parallel framework for R
                   <br/>
                   <a class="d4pbbc-url" href="http://view.ncbi.nlm.nih.gov/pubmed/19114001" rel="nofollow" target="_blank">
                    http://view.ncbi.nlm.nih.gov/pubmed/19114001
                   </a>
                   <br/>
                   <a class="d4pbbc-url" href="http://forge.nesc.ac.uk/projects/sprint/" rel="nofollow" target="_blank">
                    http://forge.nesc.ac.uk/projects/sprint/
                   </a>
                   <br/>
                   <strong class="d4pbbc-bold">
                    BACKGROUND:
                   </strong>
                   <br/>
                   Microarray analysis allows the simultaneous measurement of thousands to millions of genes or sequences across tens to thousands of different samples. The analysis of the resulting data tests the limits of existing bioinformatics computing infrastructure. A solution to this issue is to use High Performance Computing (HPC) systems, which contain many processors and more memory than desktop computer systems. Many biostatisticians use R to process the data gleaned from microarray analysis and there is even a dedicated group of packages, Bioconductor, for this purpose. However, to exploit HPC systems, R must be able to utilise the multiple processors available on these systems. There are existing modules that enable R to use multiple processors, but these are either difficult to use for the HPC novice or cannot be used to solve certain classes of problems. A method of exploiting HPC systems, using R, but without recourse to mastering parallel programming paradigms is therefore necessary to analyse genomic data to its fullest.
                   <br/>
                   <strong class="d4pbbc-bold">
                    RESULTS:
                    <br/>
                   </strong>
                   We have designed and built a prototype framework that allows the addition of parallelised functions to R to enable the easy exploitation of HPC systems. The Simple Parallel R INTerface (SPRINT) is a wrapper around such parallelised functions. Their use requires very little modification to existing sequential R scripts and no expertise in parallel computing. As an example we created a function that carries out the computation of a pairwise calculated correlation matrix. This performs well with SPRINT. When executed using SPRINT on an HPC resource of eight processors this computation reduces by more than three times the time R takes to complete it on one processor.
                   <br/>
                   <strong class="d4pbbc-bold">
                    CONCLUSIONS:
                   </strong>
                   <br/>
                   SPRINT allows the biostatistician to concentrate on the research problems rather than the computation, while still allowing exploitation of HPC systems. It is easy to use and with further development will become more useful as more functions are added to the framework.
                  </p>
                  <p>
                   R/parallel – speeding up bioinformatics analysis with R
                   <br/>
                   <a class="d4pbbc-url" href="http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&amp;pubmedid=18808714" rel="nofollow" target="_blank">
                    http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&amp;pubmedid=18808714
                   </a>
                   <br/>
                   <a class="d4pbbc-url" href="http://www.rparallel.org" rel="nofollow" target="_blank">
                    http://www.rparallel.org
                   </a>
                   <br/>
                   <strong class="d4pbbc-bold">
                    BACKGROUND:
                    <br/>
                   </strong>
                   R is the preferred tool for statistical analysis of many bioinformaticians due in part to the increasing number of freely available analytical methods. Such methods can be quickly reused and adapted to each particular experiment. However, in experiments where large amounts of data are generated, for example using high-throughput screening devices, the processing time required to analyze data is often quite long. A solution to reduce the processing time is the use of parallel computing technologies. Because R does not support parallel computations, several tools have been developed to enable such technologies. However, these tools require multiple modications to the way R programs are usually written or run. Although these tools can finally speed up the calculations, the time, skills and additional resources required to use them are an obstacle for most bioinformaticians.
                   <br/>
                   <strong class="d4pbbc-bold">
                    RESULTS:
                   </strong>
                   <br/>
                   We have designed and implemented an R add-on package, R/parallel, that extends R by adding user-friendly parallel computing capabilities. With R/parallel any bioinformatician can now easily automate the parallel execution of loops and benefit from the multicore processor power of today's desktop computers. Using a single and simple function, R/parallel can be integrated directly with other existing R packages. With no need to change the implemented algorithms, the processing time can be approximately reduced N-fold, N being the number of available processor cores.
                   <br/>
                   <strong class="d4pbbc-bold">
                    CONCLUSION:
                   </strong>
                   <br/>
                   R/parallel saves bioinformaticians time in their daily tasks of analyzing experimental data. It achieves this objective on two fronts: first, by reducing development time of parallel programs by avoiding reimplementation of existing methods and second, by reducing processing time by speeding up computations on current desktop computers. Future work is focused on extending the envelope of R/parallel by interconnecting and aggregating the power of several computers, both existing office computers and computing clusters.
                  </p>
                  <p>
                   没有测试过，大家可以参考一下。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-269259">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年4月29日 上午11:17
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/14936/">
                    朱世武《基于SAS系统的金融计算》书中功能用R的实现
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/14936/#post-269259">
                   15 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-269259 -->
                <div class="odd bbp-parent-forum-1015 bbp-parent-topic-14936 bbp-reply-position-15 user-id-6119 post-269259 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <blockquote class="d4pbbc-quote">
                   <p>
                    一句话，大部分知道的方法R中已经有现成的了；少部分我们不知道的方法中的绝大部分已经在R中实现了。
                   </p>
                  </blockquote>
                  <p>
                   [s:11][s:11]
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-269256">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年4月29日 上午10:49
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15061/">
                    如何把x轴的label按角度调整方向
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15061/#post-269256">
                   5 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-269256 -->
                <div class="even bbp-parent-forum-999 bbp-parent-topic-15061 bbp-reply-position-5 user-id-6119 topic-author post-269256 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   是的，我把工作区间分成两个部分，画图的那部分不显示x轴的标注，并且在画图之前要设置边距op1 &lt;- par(mar(c(0,4.1,4,2)，其中第一个零是必须的，或者设的比较小，在紧挨着的下面的部分设置op1 &lt;- par(mar=c(5,4.1,0,2)，就是边距为零，其中第三个零是必须的，然后plot一个坐标，在指定的位置用text(1,1,"aaaa",crt=60)，就可以了。
                   <br/>
                   在下面的基础上修改就可以了。
                  </p>
                  <pre class="highlight ">layout(matrix(c(1,2),nr=2))
op1 &lt;- par(mar=c(0,4.1,4,2))
hist(rnorm(1000),xaxt="n")
op1 &lt;- par(mar=c(5,4.1,0,2))
plot(1:10,1:10,pch="",axes=FALSE,xlab="",ylab="")
for(i in 1:10){
text(i,10,"aaaaaaaaa",srt=60)
}
</pre>
                  <p>
                   哈哈，比较笨的办法。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
                <div class="bbp-reply-header" id="post-269208">
                 <div class="bbp-meta">
                  <span class="bbp-reply-post-date">
                   2009年4月28日 下午6:34
                  </span>
                  <span class="bbp-header">
                   回复：
                   <a class="bbp-topic-permalink" href="http://cos.name/cn/topic/15061/">
                    如何把x轴的label按角度调整方向
                   </a>
                  </span>
                  <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/15061/#post-269208">
                   2 楼
                  </a>
                  <span class="bbp-admin-links">
                  </span>
                 </div>
                 <!-- .bbp-meta -->
                </div>
                <!-- #post-269208 -->
                <div class="odd bbp-parent-forum-999 bbp-parent-topic-15061 bbp-reply-position-2 user-id-6119 topic-author post-269208 reply type-reply status-publish hentry">
                 <div class="bbp-reply-author">
                  <a class="bbp-author-avatar" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   <img src="http://sdn.geekzu.org/avatar/d21b7a75e75217c89c776b3166952e93?s=80&amp;d=monsterid&amp;r=g"/>
                  </a>
                  <br/>
                  <a class="bbp-author-name" href="http://cos.name/cn/profile/6119/" rel="nofollow" title="查看pengchy的档案">
                   pengchy
                  </a>
                  <br/>
                  <div class="bbp-author-role">
                   普通会员
                  </div>
                 </div>
                 <!-- .bbp-reply-author -->
                 <div class="bbp-reply-content">
                  <p>
                   已经通过我所说的方法实现。
                  </p>
                 </div>
                 <!-- .bbp-reply-content -->
                </div>
                <!-- .reply -->
               </li>
               <!-- .bbp-body -->
               <li class="bbp-footer">
                <div class="bbp-reply-author">
                 作者
                </div>
                <div class="bbp-reply-content">
                 帖子
                </div>
                <!-- .bbp-reply-content -->
               </li>
               <!-- .bbp-footer -->
              </ul>
              <!-- #topic-0-replies -->
              <div class="bbp-pagination">
               <div class="bbp-pagination-count">
                查看 15 个帖子 - 136 到 150（总计 266 个）
               </div>
               <div class="bbp-pagination-links">
                <a class="prev page-numbers" href="http://cos.name/cn/profile/6119/replies/page/9/">
                 ←
                </a>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/">
                 1
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/9/">
                 9
                </a>
                <span class="page-numbers current">
                 10
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/11/">
                 11
                </a>
                <span class="page-numbers dots">
                 …
                </span>
                <a class="page-numbers" href="http://cos.name/cn/profile/6119/replies/page/18/">
                 18
                </a>
                <a class="next page-numbers" href="http://cos.name/cn/profile/6119/replies/page/11/">
                 →
                </a>
               </div>
              </div>
             </div>
            </div>
            <!-- #bbp-user-replies-created -->
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>